<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>错题悬赏</title>
    <style>
        h6{
            border-bottom:1px solid #ddd;
            padding-bottom:20px;
        }
        .biaoqian{
            margin-top:50px;
        }
        .biaoqian>img{
            width:5%;
        }
        #xs_img img{
            width:30%;
            margin-top:30px;
        }
        .cla_label b{
            margin-left:10px;
        }
    </style>
</head>

<body>
<div class="xuanshang">
    <h6 class="addtime"></h6>
    <p class="cont"></p>
    <div id="xs_img">
    </div>
    <div class="biaoqian">
        <img src="../../image/biaoqian.png" alt="">
        <span class="cla_label"></span>
    </div>
</div>
<input type="hidden" id="xid" value="${id}">

</body>
<script src="../../js/jquery.js"></script>
<script>
    //时间戳转时间

    $(function(){
        var xid=$('#xid').val();
        var xtoken=$('#xtoken').val();
        $.ajax({
            type:'post',
            url:'http://app.scjapp.com:8088/cuotigou/offerReward/details',
            data:{
                id:xid,

            },
            success:function(data){
                console.log(data);
                //时间
                var addtime=data.data.sOfferReward.addTime;
                var addTime=new Date(parseInt(addtime)).toLocaleString().replace(/:\d{1,2}$/,' ');
                $('.addtime').html(addTime);
                //文字标题
                var cont=data.data.sOfferReward.content;
                $('.cont').html(cont);
                //图片
                var data_img=data.data.sOfferReward.imageList;
                console.log(data_img);
                var img_html='';
                for (var i = 0, len = data_img.length; i < len; i++) {

                    img_html+='<img src="' + data_img[i] + '"  />'

                }
                $('#xs_img').html(
                    img_html
                )
                //标签
                var cla_label=data.data.sOfferReward.labelList;
                var label='';
                for (var i = 0, len = cla_label.length; i < len; i++) {
                    label+='<b>'+cla_label[i]+'</b>'
                }
                $('.cla_label').html(label);

            }
        })
    })
</script>
</html>